package com.wy2cloud.gateway.controller;

import javax.ws.rs.QueryParam;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.Authentication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.wy2cloud.gateway.feignclients.UserClient;
import com.wy2cloud.jjwt.security.SecurityUser;
import com.wy2cloud.user.entity.SysUser;

@RestController
public class HomeController {

	@Autowired
	private UserClient userClient;
	
	@RequestMapping("/")
	public SecurityUser index(Authentication authentication) {
		
		SecurityUser user=(SecurityUser) authentication.getPrincipal();
		
		
		return user;
	}
}
